package com.hsav.kcxb;

import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.hsav.kcxb.main.MSYS;
import com.hsav.kcxb.R;


public class MainInitActivity extends AppCompatActivity {

    private static final String TAG = MainInitActivity.class.getSimpleName();
    private TextView tvContent;
    private int mTestRank = 0;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_init_main);

        tvContent = (TextView) findViewById(R.id.textView);


        Button key1 = (Button)findViewById(R.id.keyTest1);
        key1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                tvContent.setText("");
            }
        });
        Button key2 = (Button)findViewById(R.id.keyTest2);
        key2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mTestRank > 0) {
                }
                else{
                    tvContent.setText("需要先按测试1");
                }
            }
        });
        Button key3 = (Button)findViewById(R.id.keyTest3);
        key3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });

    }

    private void fetchAreaList(){
//        mSvrRankBa.fetchAreaList(ReadMode.START, new RankBaService.FetchStringListHandler() {
//            @Override
//            public void onComplete(ServiceState state, String extraMessage, PageList<String> pageList) {
//                if (pageList.result.size() > 0){
//                    int g4Local_1 = 0;
//                    String gsLocal_1 = "榜列表：";
//                    do {
//                        gsLocal_1 +=  pageList.result.get(g4Local_1) + "  ";
//                    } while (++g4Local_1 < pageList.result.size());
//                    tvContent.setText(gsLocal_1);
//                }
//            }
//        });
    }

}
